PADS

Gerber File Elements

For PCB models generated by PADS, all Gerber file properties are extracted from the lower-case file name, that is the fileName element. Below are examples of fileName elements that correspond to all the Gerber files for three different PCB models.

  • Model 1:

Copy
<fileName>compo</fileName>
<fileName>drill</fileName>
<fileName>ground plane</fileName>
<fileName>inner2</fileName>
<fileName>inner3</fileName>
<fileName>maskb</fileName>
<fileName>maskt</fileName>
<fileName>pasteb</fileName>
<fileName>pastet</fileName>
<fileName>power plane</fileName>
<fileName>silkb</fileName>
<fileName>silkt</fileName>
<fileName>solder</fileName>
  • Model 2:

Copy
<fileName>xxx_l1</fileName>
<fileName>xxx_l2</fileName>
<fileName>xxx_l3</fileName>
<fileName>xxx_l4</fileName>
<fileName>xxx_l5</fileName>
<fileName>xxx_l6</fileName>
<fileName>xxx_sm1</fileName>
<fileName>xxx_sm2</fileName>
<fileName>xxx_ss1</fileName>
<fileName>xxx_ss2</fileName>
  • Model 3:

Copy
<fileName>layer_1</fileName>
<fileName>layer_2</fileName>
<fileName>layer_3</fileName>
<fileName>layer_4</fileName>
<fileName>layer_5</fileName>
<fileName>layer_6</fileName>
<fileName>layer_7</fileName>
<fileName>layer_8</fileName>
<fileName>manufacturing</fileName>
<fileName>silkscreen_bot</fileName>
<fileName>silkscreen_top</fileName>
<fileName>soldermask_bot</fileName>
<fileName>soldermask_top</fileName>

A propertyBean element whose propertyName is equal to Is Silkscreen is added to all Gerber file pcbTreeBean elements. The same applies to a propertyBean element whose propertyName is equal to Is Soldermask. If the value of the Is Silkscreen or Is Soldermask attribute is equal to true, a propertyBean element whose propertyName is equal to Is Top Board Side is also extracted. If the Is Top Board Side property cannot be computed, both the Is Silkscreen and Is Soldermask properties are set to false.

If there is an info file whose fileName contains the substring readme, a first attempt is made to extract properties listed above from the comment element of this file that contains the substring <filename>.<fileExtension>. If this comment element contains the string silkscreen, then the property Is Silkscreen is set to true, otherwise the property is set to false. If the comment element contains the string solder resist or solder mask, then the property Is Soldermask is set to true, otherwise the property is set to false. The Is Top Board Side property is set to true if the comment element contains the string first component side or top, and it is set to false if the comment element contains string second component side or bottom.

If no information is extracted from the readme file, the filename property of the file is analyzed.

A propertyBean element whose propertyName is equal to Is Silkscreen is populated as follows:

  • If fileName contains the substring <delimiter><str><delimiter> where <delimiter> is a space, dot(.), dash (-), underscore (_), start of string, or end of string, and where <str> is ss1, sst, or sec, then the Is Silkscreen property is set to true and the Is Top Board Side property is set to true.

  • If fileName contains the substring <delimiter><str><delimiter> where <str> is ss2, ssb, or ses, then the Is Silkscreen property is set to true and the Is Top Board Side property is set to false.

  • If fileName contains the string silkscreen, silk, or overlay, then the Is Silkscreen property is set to true. The Is Top Board Side property is set to true, if fileName contains the substring <delimiter><silkscreen-string><top-string><delimiter>, <delimiter><top-string><silkscreen-string><delimiter>, or <delimiter><top-string><delimiter>, where <top-string> is t or top. The Is Top Board Side property is set to false, if fileName contains substring <delimiter><silkscreen-string><bottom-string><delimiter>, <delimiter><bottom-string><silkscreen-string><delimiter>, or <delimiter><bottom-string><delimiter> where <bottom-string> is b, bot, or bottom.

  • In all other cases the Is Silkscreen property is set to false.

A propertyBean element whose propertyName is equal to Is Soldermask is populated as follows:

  • f fileName contains the substring paste, the Is Soldermask property is set to false.

  • If fileName contains the substring <delimiter><str><delimiter>, where <str> is sm1, smt, tsm, or slc, then the Is Soldermask property is set to true and the Is Top Board Side property is set to true.

  • If fileName contains the substring <delimiter><str><delimiter>, where <str> is sm2, smb, bsm, or sls, then the Is Silkscreen property is set to true and Is Top Board Side property is set to false.

  • If fileName contains the string soldermask, solder, mask, or res, then the Is Silkscreen property is set to true. The Is Top Board Side property is set to true if fileName contains the substring <delimiter><soldermask-string><top-string><delimiter>, <delimiter><top-string><soldermask-string><delimiter>, or <delimiter><top-string><delimiter>, where <top-string> is t or top. The Is Top Board Side property is set to false, if fileName contains the substring <delimiter><soldermask-string><bottom-string><delimiter>, <delimiter><bottom-string><soldermask-string><delimiter>, or <delimiter><bottom-string><delimiter>, where <bottom-string> is b, bot, or bottom.

  • In all other cases the Is Soldermask property is set to false.

For example, for Model 1, the property Is Silkscreen is set to true for the files silkb and silkt; for Model 2, the property is set to true for the files xxx_ss1 and xxx_ss2; for Model 3, it is set to true for the files silkscreen_bot and silkscreen_top. For model 1, the property Is Soldermask is set to true for the files maskb and maskt; for Model 2 the property is set to true for the files xxx_sm1 and xxx_sm2; for Model 3, it is set to true for the files soldermask_bot and soldermask_top.

All other propertyBean elements are added only to pcbTreeBean elements that correspond to a Gerber file for a copper layer. propertyBean elements are added as follows:

  • The value of the Layer Name property is set to the value of the fileName property, that is, the lower-case Gerber file name without path and extension.

  • Layer Number property extraction depends on layer type, as explained below.

  • The Material Thickness property is not set.

A Gerber file for a copper layer of a given model has a file name that satisfies the following conditions:

  • The file name does not satisfy any criteria for silkscreen and soldermask files that are described above.

  • The file name does not contain any of the strings gold, pas, res, drill, comp, assembly, temp, outline, cream, or ident.

  • At least one the following holds:

    • The file name is compo, primary, or pri, or contains the string top or <delimiter>lc<delimiter>. The named file is assumed to be for the model’s first layer, and the Layer Number property is set to 1. An example of such a file is compo from Model 1.

    • ile name equals solder, sol, secondary, or sec, or contains string bot or <delimiter>ls<delimiter>. The named file is assumed to be for the model’s last layer, and the Layer Number property is set to the total number of copper layers in the model. An example of such a file is solder from Model 1, and the Layer Number property for its layer is set to 6.

    • The file name is ground plane, ground_p, or ground. The named file is assumed to be for the model’s second layer, and the Layer Number property is set to 2. An example of such a file is ground plane from Model 1.

    • The file name is power plane, power_p, or power. The named file is assumed to be for the model’s second-to-last layer, and the Layer Number property is set to one less than the total number of copper layers in the model. An example of such a file is power plane from Model 1, and the Layer Number property for its layer is set to 5.

    • The file name either matches the pattern <any-symbols><layer-string><any-symbols><layer- number> or contains the string L<layer-number>, where <layer-string> is lay, in, or art. The Layer Number property is set to <layer-number> unless that layer number has already been assigned based on a case listed above. If <layer-number> has already been assigned, Layer Number is set to a slightly smaller or larger value compatible with the other layer assignments.

For example, for the file inner2 from Model 1, <layer-number> is 2, but 2 has already been assigned to the ground plane layer and 1 (a slightly smaller value) has already been assigned to the top layer; so, Layer Number is set to 3 (a slightly larger value). For the file xxx_l4 from Model 2, <layer-number> is 4, and the Layer Number property is set to 4. For file layer_8 from Model 3, <layer-number> is 8, and the Layer Number property is set to 8.

Drill File Elements

For all PADS drill files, both the properties Is External Contour Drill File and Is Probe Drill File are always set to false.

For PCB models generated by PADS, information about start and end layers (the Start Layer and End Layer properties) is extracted from fileName elements. Below are examples of fileName elements that correspond to all the drill files of a PCB model. The fileName elements that correspond to all the Gerber files of this model are listed in the previous section under Model 3.

Copy
<fileName>nc_drill_laservias_1-2.drl</fileName>
<fileName>nc_drill_pth_vias_1-8.drl</fileName>

Information about start and end layers can be extracted if the drill file name matches the following pattern: <any-symbols><delimiter><start-layer-str><delimiter><end-layer-str>. The Start Layer property is set to the Layer Name property of the layer whose Layer Number property is equal to the value extracted from <start-layer-str>. The End Layer property is populated the same way, from the <end-layer-str>. A number can be extracted from the string in the following cases:

  • String is a number. In this case Layer Number is equal to this number. For the first drill file in the example listed above, the start layer number is 1, so the Start Layer property is set to layer_1. The end layer number of this file is 2, and the End Layer property is set to layer_2. For the second drill file, the Start Layer property is equal to layer_1, and the End Layer property is equal to layer_8.

  • String contains the substring top. In this case Layer Number is equal to 1.

  • String contains substring bot. In this case, Layer Number is equal to the number of copper layers.

  • String is a combination of the substring in and a number. In this case, Layer Number is equal to this number increased by 1.

If information about the start and end layers cannot be extracted from the drill file name, the Start Layer value is set to the Layer Name property of the layer with number 1, and the End Layer value is set to the Layer Name property of the last layer.

Information about tool properties is extracted from the comments element of the pcbTreeBean element that corresponds to the report file. The report file should have the same name as the drill file and extension rep. Here is an example of pcbTreeBean elements that represent the drill file NC-DRILL.drl and its associated report file NC-DRILL.rep:

Copy
<pcbTreeBean>
        <comments>
…
        </comments>
        <name>Gerber/NC-DRILL.drl</name>
        <nodes />
        <properties>
          <propertyBean>
            <propertyName>Type</propertyName>
            <propertyValue>Drill</propertyValue>
          </propertyBean>
        </properties>
      </pcbTreeBean>
      <pcbTreeBean>
…
      <pcbTreeBean>
        <comments>
          <comment>Drill Sizes Report</comment>
          <comment>==================</comment>
          <comment>Tool   Size   Pltd   Feed   Speed   Qty</comment>
          <comment>====   ====   ====   ====   =====   ===</comment>
          <comment>1     10    x       95    300   2625</comment>
…
        </comments>
        <name>Rep/NC-DRILL.rep</name>
        <nodes />
        <properties>
          <propertyBean>
            <propertyName>Type</propertyName>
            <propertyValue>Info</propertyValue>
          </propertyBean>
        </properties>
      </pcbTreeBean>
<pcbTreeBean>

Information about tool properties is extracted from the comment element that matches the following pattern: <tool-number> <tool-diameter> <is-plated-sign> <feed> <speed> <holes-quantity>, where <is-plated-sign> is x or -. For each such element, a new pcbTreeBean element is added. The name element of the new node is not set. The properties element is populated as follows:

  • Value of the Tool Number property is set to <tool-number>. For the example listed above, it is 1.

  • Value of the Diameter property is set to <tool-diameter> multiplied by 0.001. For the example listed above, it is 0.01.

  • Value of the Is Plated property is set to true if <is-plated-sign> is equal to x, and to false if <is-plated-sign> is equal to -. For the example listed above, the Is Plated property value is true.

  • Value of the Holes Quantity property is set to <holes-quantity>. For the example listed above, it is 30.

  • Positive Tolerance, Negative Tolerance, Index In File, and Unit are not set.

If no report file that matches the drill file is found, tool metadata is extracted from the header of the drill file, that is, from the comments element of the pcbTreeBean element that corresponds to the drill file. Here is an example of the pcbTreeBean elements that represent a drill file:

Copy
<pcbTreeBean>
        <comments>
          <comment>FILE_FORMAT=2:4</comment>
          <comment>TYPE=PLATED</comment>
          <comment>T1C.01</comment>
…
          <comment>TYPE=NON_PLATED</comment>
          <comment>T11C0.7</comment>
        </comments>
        <name>Gerber/NC-DRILL.drl</name>
        <nodes />
        <properties>
          <propertyBean>
            <propertyName>Type</propertyName>
            <propertyValue>Drill</propertyValue>
          </propertyBean>
        </properties>
      </pcbTreeBean>
<pcbTreeBean>

Information about tool properties is extracted from comment elements that match the pattern T<tool-number>C<tool-diameter> and are located after a comment element with value TYPE=PLATED or TYPE=NON_PLATED. For each such element, a new pcbTreeBean element with name element equal to T<tool-number> is added (for the example listed above, it is T1 for the first tool and T11 for the second tool). The properties element is populated as follows:

  • Value of the Tool Number property is set to <tool-number>. For the example listed above, it is 1 for the first tool and 11 for the second tool.

  • Value of the Diameter property is set to <tool-diameter>. For the example listed above, it is 0.01 for the first tool and 0.7 for the second tool.

  • Value of the Is Plated property is set to true if the current comment element is located after a comment element with value TYPE=PLATED and before a comment element with value TYPE=NON_PLATED; it is set to false otherwise. For the example listed above, Is Plated is true for the first tool and false for the second tool.

  • Positive Tolerance, Negative Tolerance, Index In File, Holes Quantity and Unit are not set.

Top-level Element

No properties of the whole board are extracted for PCB models generated by PADS.

Recommended File Format

aPriori recommends that you include the report file in the .zip archive of the PCB model. aPriori also recommends that you generate report files with the same units of measurement as the drill files. This prevents extraction of ambiguous tool metadata.

aPriori recommends the use of a naming convention according to which copper layers have names of the form Lay<layer-number> or Layer< layer-number>.

aPriori also recommends that drill files have names of the form <any-symbols>_<start-layer-number>-<end-layer-number>.